<!DOCTYPE html>
<html devsite>
  <head>
    <title>TensorFlowLiteSwift Framework Reference</title>
    <link rel="stylesheet" href="../../css/jazzy.css" />
    <meta charset='utf-8'>
  </head>
  <body>
    <div class="content-wrapper">
      <article class="main-content">
        <section>
          <section class="section">
            <h1>Shape</h1>
              <div class="declaration">
                <div class="language">
                  <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Shape</span> <span class="p">:</span> <span class="kt">Equatable</span><span class="p">,</span> <span class="kt">Hashable</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt"><a href="../../Structs/Tensor.html">Tensor</a></span><span class="o">.</span><span class="kt">Shape</span><span class="p">:</span> <span class="kt">ExpressibleByArrayLiteral</span></code></pre>

                </div>
              </div>
            <p>The shape of a <code><a href="../../Structs/Tensor.html">Tensor</a></code>.</p>

          </section>
          <section class="section task-group-section">
            <div class="task-group">
              <ul>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:19TensorFlowLiteSwift0A0V5ShapeV4rankSivp"></a>
                    <a name="//apple_ref/swift/Property/rank" class="dashAnchor"></a>
                    <h3><a class="token" href="#/s:19TensorFlowLiteSwift0A0V5ShapeV4rankSivp">rank</a></h3>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>The number of dimensions of the <code><a href="../../Structs/Tensor.html">Tensor</a></code>.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="objc">
                          <p class="aside-title-objc">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">rank</span><span class="p">:</span> <span class="kt">Int</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:19TensorFlowLiteSwift0A0V5ShapeV10dimensionsSaySiGvp"></a>
                    <a name="//apple_ref/swift/Property/dimensions" class="dashAnchor"></a>
                    <h3><a class="token" href="#/s:19TensorFlowLiteSwift0A0V5ShapeV10dimensionsSaySiGvp">dimensions</a></h3>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>An array of dimensions for the <code><a href="../../Structs/Tensor.html">Tensor</a></code>.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="objc">
                          <p class="aside-title-objc">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">dimensions</span><span class="p">:</span> <span class="p">[</span><span class="kt">Int</span><span class="p">]</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:19TensorFlowLiteSwift0A0V5ShapeVyAESaySiGcfc"></a>
                    <a name="//apple_ref/swift/Method/init(_:)" class="dashAnchor"></a>
                    <h3><a class="token" href="#/s:19TensorFlowLiteSwift0A0V5ShapeVyAESaySiGcfc">init(_:)</a></h3>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Creates a new instance with the given array of dimensions.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="objc">
                          <p class="aside-title-objc">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="n">_</span> <span class="nv">dimensions</span><span class="p">:</span> <span class="p">[</span><span class="kt">Int</span><span class="p">])</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>dimensions</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Dimensions for the <code><a href="../../Structs/Tensor.html">Tensor</a></code>.</p>
                                </div>
                              </td>
                            </tr>                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:19TensorFlowLiteSwift0A0V5ShapeVyAESid_tcfc"></a>
                    <a name="//apple_ref/swift/Method/init(_:)" class="dashAnchor"></a>
                    <h3><a class="token" href="#/s:19TensorFlowLiteSwift0A0V5ShapeVyAESid_tcfc">init(_:)</a></h3>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Creates a new instance with the given elements representing the dimensions.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="objc">
                          <p class="aside-title-objc">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="n">_</span> <span class="nv">elements</span><span class="p">:</span> <span class="kt">Int</span><span class="o">...</span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>elements</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Dimensions for the <code><a href="../../Structs/Tensor.html">Tensor</a></code>.</p>
                                </div>
                              </td>
                            </tr>                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:19TensorFlowLiteSwift0A0V5ShapeV12arrayLiteralAESid_tcfc"></a>
                    <a name="//apple_ref/swift/Method/init(arrayLiteral:)" class="dashAnchor"></a>
                    <h3><a class="token" href="#/s:19TensorFlowLiteSwift0A0V5ShapeV12arrayLiteralAESid_tcfc">init(arrayLiteral:)</a></h3>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Creates a new instance with the given array literal representing the dimensions.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="objc">
                          <p class="aside-title-objc">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">arrayLiteral</span><span class="p">:</span> <span class="kt">Int</span><span class="o">...</span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>arrayLiteral</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Dimensions for the <code><a href="../../Structs/Tensor.html">Tensor</a></code>.</p>
                                </div>
                              </td>
                            </tr>                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>          </section>
        </section>
      </article>
    </div>
  </body>
</html>
